package com.jtjrenren.android.taxi.passenger;

import android.os.Environment;

import com.jtjrenren.android.taxi.passenger.R;
import com.jtjrenren.android.taxi.passenger.utils.ModuleUtils;

import java.io.File;

/**
 * Created by Administrator on 2015/12/21.
 */
public class Constants {
    //DES加密相关配置
    public static String DES_KEY = "87920770";
    public static byte[] DES_IV = {0x12, 0x34, 0x56, 0x78, (byte) 0x90,
            (byte) 0xAB, (byte) 0xCD, (byte) 0xEF};

    //API相关配置
    public static final String CONFIG_URL_BASE = ModuleUtils.getStrFromResource(R.string.url_base);
    public static final String CONFIG_URL_SFBZ = CONFIG_URL_BASE + "Web/CarRule.aspx?lat=###&lng=###&carType=###";

    public static final String CONFIG_SEARCHE_AREA_RADIUS = "2000";//默认搜车半径

    //地址信息相关配置
    public static final int CONFIG_ADDR_TYPE_HISTORY = 0;
    public static final int CONFIG_ADDR_TYPE_HOME = 1;
    public static final int CONFIG_ADDR_TYPE_COMPANY = 2;
    public static final int CONFIG_ADDR_TYPE_OTHER = 3;


    //sharedpreference名称
    public static final String SP_LAUCH_COUNT = "lauch_count";
    public static final String SP_LAST_LOCATION_LAT = "location_lat";
    public static final String SP_LAST_LOCATION_LNG = "location_lng";
    public static final String SP_USER_ID = "user_id"; //上次登录记住的用户
    public static final String SP_SETTING_VOICE_SWITCH = "voice_switch"; //声音的开关
    public static final String SP_SETTING_CHECKNOTFINISHORDER_SWITCH = "order_check"; //检查未完成订单提示
    public static final String SP_SETTING_GPS_SWITCH = "gps_switch"; //检查gps的开关提示

    //默认值
    //深圳市政府经纬度
    public static final String DEFAULT_LAT = "22.548554";  //纬度
    public static final String DEFAULT_LNG = "114.065944";//经度
    public static final String DEFAULT_SMSTYPE_REGISTER = "0";
    public static final String DEFAULT_SMSTYPE_FINDPWD = "1";
    public static final String DEFAULT_SMSTYPE_NOTIYCATION = "2";
    public static final String DEFAULT_SMSTYPE_TIP = "3";
    public static final String DEFAULT_SMSTYPE_BJ = "4";
    public static final int DEFAULT_COUPONS_LIST_ALL = 0;
    public static final int DEFAULT_COUPONS_LIST_SPECAR = 2;
    public static final int DEFAULT_COUPONS_LIST_TAXI = 1;
    public static final int DEFAULT_COUPONS_STATUS_NOTUSE = 0;//0=未使用 1=已使用 2=已过期 3=已作废 4=其它
    public static final int DEFAULT_COUPONS_STATUS_USED = 1;
    public static final int DEFAULT_COUPONS_STATUS_OVERDATE = 2;
    public static final int DEFAULT_COUPONS_STATUS_ZUOFEI = 3;
    public static final int DEFAULT_COUPONS_STATUS_OTHER = 4;


    //action动作
    public static final String ACTION_APK_DOWNED = "apk_hasdown";
    public static final String ACTION_NETWORK_DISCONN = "network_disconn"; //网络没有连接
    public static final String ACTION_USER_NOTLOGIN = "user_login_not"; //用户没有登录
    public static final String ACTION_CONTROL_RESPONSE_COMMON = "response_common"; //调度中心通用回复
    public static final String ACTION_CONTROL_RESPONSE_ORDERACCEPT = "response_accept"; //调度中心接单信息
    public static final String ACTION_CONTROL_RESPONSE_ORDERAMOUNT = "response_amount"; //调度中心车费信息
    public static final String ACTION_CONTROL_RESPONSE_ORDERDISPATCH = "response_dispatch"; //调度中心分发情况
    public static final String ACTION_CONTROL_RESPONSE_ORDERDRIVERCANCLE = "response_drivercancle"; //调度中心司机取消
    public static final String ACTION_CONTROL_RESPONSE_ORDERFILTER = "response_filter"; //调度中心正在筛选
    public static final String ACTION_CONTROL_RESPONSE_ORDERPASSGERINCAR = "response_passgerincar"; //调度中心乘客上车确认
    public static final String ACTION_CONTROL_RESPONSE_ORDERDRIVERCOMING = "response_drivercoming"; //调度中心司机接驾中
    public static final String ACTION_CONTROL_RESPONSE_OTHERLOGIN = "response_otherlogin"; //调度中心司机接驾中

    //activity的requestcode
    public static final int INTENT_REQUEST_CODE_CHOOSEPLACE = 500;
    public static final int INTENT_REQUEST_CODE_LOGIN = 501;
    public static final int INTENT_REQUEST_CODE_REGISTER = 502;
    public static final int INTENT_REQUEST_CODE_PAY = 503;

    //订单相关
    public static final int ORDER_SOURCE_IMMEDIATE = 1;//即时订单
    public static final int ORDER_SOURCE_APPOINTMENT = 2;//预约订单
    public static final int ORDER_SOURCE_ASSIGN = 3;//指派订单
    public static final int ORDER_SOURCE_FIXED = 4;//固定点订单

    public static int CARTYPE_TAXI = 1; //出租车
    public static int CARTYPE_SPECAR = 2;//约租车
    public static int CARTYPE_SPECAR_SOFT = 1;//约租车
    public static int CARTYPE_SPECAR_HAOHUA = 3;//约租车
    public static int CARTYPE_SPECAR_BUSINESS = 2;//约租车

    public static final int ORDER_STATUS_DISPATCH_WAITING = 0;//待调度
    public static final int ORDER_STATUS_DISPATCH_ING = 1;//正在调度
    public static final int ORDER_STATUS_INCAR = 2;//正在接送
    public static final int ORDER_STATUS_FINISH = 3;//订单成功完成
    public static final int ORDER_STATUS_CANCLE_BEFOREDISPATCH = 4;//订单承接前乘客取消
    public static final int ORDER_STATUS_CANCLE_AFTERDRIVER_ACCEPTE = 5;//订单承接后乘客取消
    public static final int ORDER_STATUS_CANCLE_BYDRIVER = 6;//订单承接后司机取消
    public static final int ORDER_STATUS_PASSGER_INCARORPAY = 7;//司机已经提交乘客支付
    public static final int ORDER_STATUS_FINISH_FORCE = 8;//强制完成 (订单失效)
    public static final int ORDER_STATUS_PICKUP_PASSGER = 9;//去接乘客(终端:开始处理订单)
    public static final int ORDER_STATUS_DISPATCH_FINISH = 10;//调度完成
    public static final int ORDER_STATUS_ORDER_CRASHPAY = 11;//现金支付
    public static final int ORDER_STATUS_CLOSE_BYPLATFORM = 12;//平台关闭（手动关闭）

    public static final int ORDER_PAY_STATUS_PAYED = 1;//已经支付
    public static final int ORDER_PAY_STATUS_PAYED_NOE = 0;//没有支付

    public static final String APP_DEFAULT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator+"rrcx";

}
